home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
mail.altrad.com
/
2015.02.mail.altrad.com.tar
/
mail.altrad.com
/
TEST
/
office german
/
PROPLUS.WW
/
PROPLSWW.CAB
/
MSORES.DLL
/
226
/
656
< prev
next >
Wrap
Extensible Markup Language
|
2006-10-26
|
16KB
|
331 lines
<?xml version="1.0" encoding="UTF-8" ?>
<!--
***************************************************************************
dlcxsd2xsf.xslt
Copyright (c) 2004 Microsoft Corporation
Transform that creates a manifest from an XSD.
*************************************************************************** -->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ct="http://schemas.microsoft.com/office/2006/metadata/contentType"
xmlns:sts="http://schemas.microsoft.com/sharepoint/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
<!-- Localized Strings -->
<xsl:param name="localizedPropertyPanelName">Document Information Panel</xsl:param>
<xsl:param name="localizedSingleUserErrorMsg">You can enter only one value.</xsl:param>
<!-- Left as the default until I find out that typenamespace can change -->
<xsl:param name="typeNSUri">http://schemas.microsoft.com/office/2006/documentManagement/types</xsl:param>
<xsl:param name="dcNSUri">http://purl.org/dc/elements/1.1/</xsl:param>
<xsl:param name="dctermsNSUri">http://purl.org/dc/terms/</xsl:param>
<xsl:param name="dcmitypeNSUri">http://purl.org/dc/dcmitype/</xsl:param>
<xsl:param name="xmlNSUri">http://www.w3.org/XML/1998/namespace</xsl:param>
<xsl:param name="rootNSUri">http://schemas.microsoft.com/office/2006/metadata/propertiesRoot</xsl:param>
<!-- Determines whether or not this XSF includes template and sampledata xml. -->
<xsl:param name="fIncludeTemplate">false</xsl:param>
<xsl:param name="fDomain">false</xsl:param>
<!-- View locale -->
<xsl:param name="viewLcid">1033</xsl:param>
<!-- Properties Root namespace -->
<xsl:variable name="prNSUri">http://schemas.microsoft.com/office/2006/metadata/propertiesRoot</xsl:variable>
<!-- Core properties namespace -->
<xsl:variable name="coreNSUri">http://schemas.openxmlformats.org/package/2006/metadata/core-properties</xsl:variable>
<xsl:variable name="corePrefix">core</xsl:variable>
<xsl:variable name="baseXPath">pr:properties/p:properties/documentManagement/</xsl:variable>
<xsl:variable name="baseXPathCore">pr:properties/<xsl:value-of select="$corePrefix" />:coreProperties/</xsl:variable>
<xsl:template match="/ct:contentTypeSchema | /xsd:schema">
<xsl:comment>This file is automatically created by Microsoft Office.</xsl:comment>
<xsf:xDocumentClass
solutionFormatVersion="2.0.0.0"
solutionVersion="1.0.0.1"
productVersion="12.0.0"
xmlns:xsf="http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"
xmlns:xsf2='http://schemas.microsoft.com/office/infopath/2006/solutionDefinition/extensions'
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xdUtil="http://schemas.microsoft.com/office/infopath/2003/xslt/Util"
xmlns:xdXDocument="http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument"
xmlns:xdMath="http://schemas.microsoft.com/office/infopath/2003/xslt/Math"
xmlns:xdDate="http://schemas.microsoft.com/office/infopath/2003/xslt/Date"
xmlns:sts="http://schemas.microsoft.com/sharepoint/soap/"
xmlns:ma="http://schemas.microsoft.com/office/2006/metadata/properties/metaAttributes"
xmlns:dms="http://schemas.microsoft.com/office/2006/documentManagement/types"
xmlns:p="http://schemas.microsoft.com/office/2006/metadata/properties"
xmlns:s0="http://schemas.microsoft.com/sharepoint/soap/directory/"
xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >
<xsl:variable name="nsDecls" select="xsd:schema[@ma:root='true']/namespace::*[local-name() != 'xml']" />
<xsl:variable name="schemas" select="/ct:contentTypeSchema/xsd:schema | /xsd:schema" />
<xsl:variable name="urlFields" select="xsd:schema[not(@ma:root='true')]/xsd:element[
not(@ma:hidden='true') and
not(@ma:readOnly='true') and
xsd:complexType/xsd:complexContent/*/@base='dms:URL']" />
<xsl:variable name="userFields" select="xsd:schema[not(@ma:root='true')]/xsd:element[
not(@ma:hidden='true') and
not(@ma:readOnly='true') and
xsd:complexType/xsd:complexContent/*/@base='dms:User']" />
<xsl:variable name="businessDataFields" select="xsd:schema[not(@ma:root='true')]/xsd:element[
not(@ma:hidden='true') and
not(@ma:readOnly='true') and
xsd:complexType/xsd:simpleContent/*/@base='dms:BusinessDataPrimaryField']" />
<!-- namespace declarations -->
<xsl:for-each select="$nsDecls">
<xsl:attribute name="{local-name()}:_" namespace="{.}" />
</xsl:for-each>
<xsl:attribute name="{$corePrefix}:_" namespace="{$coreNSUri}" />
<xsl:attribute name="pr:_" namespace="{$prNSUri}" />
<xsl:attribute name="dc:_" namespace="{$dcNSUri}" />
<!-- trust settings -->
<xsl:attribute name="trustSetting">automatic</xsl:attribute>
<xsl:choose>
<xsl:when test="$fDomain = 'false'">
<xsl:attribute name="trustLevel">restricted</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="trustLevel">domain</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsf:package>
<xsf:files>
<xsl:for-each select="$schemas">
<xsf:file>
<xsl:attribute name="name">
<xsl:text>propertySchema</xsl:text><xsl:value-of select="position() - 1" /><xsl:text>.xsd</xsl:text>
</xsl:attribute>
<xsf:fileProperties>
<xsf:property name="editability" type="string" value="none" />
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="@targetNamespace"/></xsl:attribute>
</xsf:property>
<xsl:if test="@ma:root='true' or @targetNamespace = $coreNSUri">
<xsf:property name="rootElement" type="string" value="properties" />
</xsl:if>
</xsf:fileProperties>
</xsf:file>
</xsl:for-each>
<xsf:file name="dc.xsd" >
<xsf:fileProperties>
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="$dcNSUri"/></xsl:attribute>
</xsf:property>
<xsf:property name="editability" type="string" value="none" />
</xsf:fileProperties>
</xsf:file>
<xsf:file name="dcterms.xsd" >
<xsf:fileProperties>
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="$dctermsNSUri"/></xsl:attribute>
</xsf:property>
<xsf:property name="editability" type="string" value="none" />
</xsf:fileProperties>
</xsf:file>
<xsf:file name="dcmitype.xsd" >
<xsf:fileProperties>
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="$dcmitypeNSUri"/></xsl:attribute>
</xsf:property>
<xsf:property name="editability" type="string" value="none" />
</xsf:fileProperties>
</xsf:file>
<xsf:file name="xml.xsd" >
<xsf:fileProperties>
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="$xmlNSUri"/></xsl:attribute>
</xsf:property>
<xsf:property name="editability" type="string" value="none" />
</xsf:fileProperties>
</xsf:file>
<xsf:file name="typeSchema.xsd" >
<xsf:fileProperties>
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="$typeNSUri"/></xsl:attribute>
</xsf:property>
<xsf:property name="editability" type="string" value="none" />
</xsf:fileProperties>
</xsf:file>
<xsf:file name="rootSchema.xsd" >
<xsf:fileProperties>
<xsf:property name="namespace" type="string" >
<xsl:attribute name="value"><xsl:value-of select="$rootNSUri"/></xsl:attribute>
</xsf:property>
<xsf:property name="editability" type="string" value="none" />
<xsf:property name="rootElement" type="string" value="properties" />
</xsf:fileProperties>
</xsf:file>
<xsf:file name="view1.xsl" >
<xsf:fileProperties>
<xsf:property name="lang" type="string">
<xsl:attribute name="value"><xsl:value-of select="$viewLcid" /></xsl:attribute>
</xsf:property>
</xsf:fileProperties>
</xsf:file>
<xsl:if test="count($businessDataFields) > 0">
<xsf:file name="script.js">
<xsf:fileProperties>
<xsf:property name="scriptType" type="string" value="userEvents"></xsf:property>
</xsf:fileProperties>
</xsf:file>
<xsf:file name="bizdata.gif">
<xsf:fileProperties>
<xsf:property name="fileType" type="string" value="resource"></xsf:property>
</xsf:fileProperties>
</xsf:file>
</xsl:if>
<xsl:if test="$fIncludeTemplate='true'">
<xsf:file name="template.xml"></xsf:file>
<xsf:file name="sampledata.xml">
<xsf:fileProperties>
<xsf:property name="fileType" type="string" value="sampleData"></xsf:property>
</xsf:fileProperties>
</xsf:file>
</xsl:if>
</xsf:files>
</xsf:package>
<xsf:views default="view1">
<xsf:view name="view1" caption="Default View" showMenuItem="yes">
<xsl:if test="count($businessDataFields) > 0">
<xsf:unboundControls>
<xsl:for-each select="//xsd:extension[@base='dms:BusinessDataPrimaryField']">
<xsf:button>
<xsl:attribute name="name">
<xsl:value-of select="../../../@name" /><xsl:text>_Resolver</xsl:text>
</xsl:attribute>
</xsf:button>
</xsl:for-each>
</xsf:unboundControls>
</xsl:if>
<xsf:mainpane transform="view1.xsl" />
<xsf:editing>
<xsl:for-each select ="$businessDataFields">
<xsf:xmlToEdit name="{@name}" item="{$baseXPath}{local-name($nsDecls[. = current()/../@targetNamespace])}:{@name}">
<xsf:editWith maxLength="1000" component="xField" proofing="no"></xsf:editWith>
</xsf:xmlToEdit>
</xsl:for-each>
<xsl:for-each select ="xsd:schema[not(@ma:root='true')]/xsd:element[
not(@ma:hidden='true') and
not(@ma:readOnly='true') and
xsd:simpleType/xsd:restriction/@base='dms:Note']">
<xsf:xmlToEdit name="{@name}" item="{$baseXPath}{local-name($nsDecls[. = current()/../@targetNamespace])}:{@name}">
<xsf:editWith type="plainMultiline" component="xField"></xsf:editWith>
</xsf:xmlToEdit>
</xsl:for-each>
<xsl:if test="@targetNamespace=$coreNSUri or xsd:schema[@targetNamespace=$coreNSUri]">
<xsf:xmlToEdit name="description" item="{$baseXPathCore}dc:description">
<xsf:editWith type="plainMultiline" component="xField"></xsf:editWith>
</xsf:xmlToEdit>
</xsl:if>
</xsf:editing>
</xsf:view>
</xsf:views>
<xsf:documentSchemas>
<xsl:for-each select="$schemas">
<xsf:documentSchema>
<xsl:attribute name="rootSchema">no</xsl:attribute>
<xsl:attribute name="location">
<xsl:value-of select="@targetNamespace" />
<xsl:text> propertySchema</xsl:text><xsl:value-of select="position() - 1" /><xsl:text>.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
</xsl:for-each>
<xsf:documentSchema rootSchema="no">
<xsl:attribute name="location">
<xsl:value-of select="$dcNSUri" />
<xsl:text> dc.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
<xsf:documentSchema rootSchema="no">
<xsl:attribute name="location">
<xsl:value-of select="$dctermsNSUri" />
<xsl:text> dcterms.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
<xsf:documentSchema rootSchema="no">
<xsl:attribute name="location">
<xsl:value-of select="$dcmitypeNSUri" />
<xsl:text> dcmitype.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
<xsf:documentSchema rootSchema="no">
<xsl:attribute name="location">
<xsl:value-of select="$xmlNSUri" />
<xsl:text> xml.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
<xsf:documentSchema rootSchema="no">
<xsl:attribute name="location">
<xsl:value-of select="$typeNSUri" />
<xsl:text> typeSchema.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
<xsf:documentSchema rootSchema="yes">
<xsl:attribute name="location">
<xsl:value-of select="$rootNSUri" />
<xsl:text> rootSchema.xsd</xsl:text>
</xsl:attribute>
</xsf:documentSchema>
</xsf:documentSchemas>
<xsl:if test="$fIncludeTemplate='true'">
<xsf:fileNew>
<xsf:initialXmlDocument caption="{$localizedPropertyPanelName}" href="template.xml"></xsf:initialXmlDocument>
</xsf:fileNew>
</xsl:if>
<xsf:ruleSets>
<xsl:for-each select ="$urlFields">
<xsf:ruleSet name="ruleSet_URL_{@name}">
<xsf:rule caption="UNC" condition="starts-with(., '\\')">
<xsf:assignmentAction targetField="." expression="concat('file://', .)"></xsf:assignmentAction>
</xsf:rule>
</xsf:ruleSet>
</xsl:for-each>
</xsf:ruleSets>
<xsf:domEventHandlers>
<xsl:for-each select ="$urlFields">
<xsl:variable name="nsPrefix" select="local-name($nsDecls[. = current()/../@targetNamespace])" />
<xsf:domEventHandler match="/{$baseXPath}{$nsPrefix}:{@name}/{$nsPrefix}:Url">
<xsf:ruleSetAction ruleSet="ruleSet_URL_{@name}"></xsf:ruleSetAction>
</xsf:domEventHandler>
</xsl:for-each>
<xsl:for-each select ="$businessDataFields">
<xsl:variable name="nsPrefix" select="local-name($nsDecls[. = current()/../@targetNamespace])" />
<xsf:domEventHandler match="/{$baseXPath}{$nsPrefix}:{@name}" handlerObject="{@name}_Validator">
</xsf:domEventHandler>
</xsl:for-each>
</xsf:domEventHandlers>
<xsf:customValidation>
<xsl:for-each select="$userFields">
<xsl:variable name="nsPrefix" select="local-name($nsDecls[. = current()/../@targetNamespace])" />
<xsf:errorCondition match="{$baseXPath}{$nsPrefix}:{@name}" expressionContext="." expression="count({$nsPrefix}:UserInfo) > 1">
<xsf:errorMessage type="modeless" shortMessage="{$localizedSingleUserErrorMsg}">
<xsl:value-of select="$localizedSingleUserErrorMsg" />
</xsf:errorMessage>
</xsf:errorCondition>
</xsl:for-each>
</xsf:customValidation>
<xsf:applicationParameters application="InfoPath Design Mode">
</xsf:applicationParameters>
<xsf:dataObjects>
</xsf:dataObjects>
<xsf:extensions>
<xsf:extension name="SolutionDefinitionExtensions">
<xsf2:solutionDefinition runtimeCompatibility="client">
<xsf2:dataConnections />
<xsf2:offline openIfQueryFails="yes" cacheQueries="yes"></xsf2:offline>
</xsf2:solutionDefinition>
</xsf:extension>
</xsf:extensions>
<xsl:if test="count($businessDataFields) > 0">
<xsf:scripts language="jscript">
<xsf:script src="script.js"></xsf:script>
</xsf:scripts>
</xsl:if>
</xsf:xDocumentClass>
</xsl:template>
</xsl:stylesheet>